-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ env: | |
NODE_VERSION: 18 | ||
|
||
jobs: | ||
build: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
@@ -44,28 +44,10 @@ jobs: | |
- name: Make bundle | ||
run: npm run bundle | ||
|
||
build-zip: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: fail on fork | ||
if: github.repository_owner != 'verdigado' | ||
run: exit 1 | ||
|
||
- name: Echo debug | ||
run: | | ||
echo "sunflower-${{ github.ref_name }}.zip" | ||
ls -la | ||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Make bundle | ||
run: npm run bundle | ||
|
||
- name: Rename ZIP file | ||
run: | | ||
mv ../sunflower.zip sunflower-${{ github.ref_name }}.zip | ||
|
@@ -77,12 +59,35 @@ jobs: | |
allowUpdates: true | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
deploy: | ||
- name: Provide deploy_key | ||
env: | ||
DEPLOY_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | ||
run: | | ||
mkdir "$HOME/.ssh" | ||
echo "$DEPLOY_KEY" > "$HOME/.ssh/id_rsa" | ||
file "$HOME/.ssh/id_rsa" | ||
chmod 600 "$HOME/.ssh/id_rsa" | ||
- name: save version | ||
run: echo ${GITHUB_REF##*/} > version.txt | ||
|
||
- name: rsync zipfile, version and changelog | ||
run: rsync -a -e "ssh -o StrictHostKeyChecking=no -i $HOME/.ssh/id_rsa" ../sunflower-${{ github.ref_name }}.zip version.txt [email protected]:/var/www/updateserver/ | ||
|
||
mkdocs: | ||
runs-on: ubuntu-latest | ||
needs: build-zip | ||
needs: build-deploy | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: mkdocs build | ||
uses: Tiryoh/actions-mkdocs@v0 | ||
with: | ||
mkdocs_version: 'latest' # option | ||
# mkdocs_version: '1.1' # option | ||
# requirements: 'requirements.txt' # option | ||
configfile: 'mkdocs/mkdocs.yml' # option | ||
|
||
- name: Provide deploy_key | ||
env: | ||
DEPLOY_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
@@ -95,5 +100,5 @@ jobs: | |
- name: save version | ||
run: echo ${GITHUB_REF##*/} > version.txt | ||
|
||
- name: rsync zipfile, version and changelog | ||
run: rsync -z -e "ssh -o StrictHostKeyChecking=no -i $HOME/.ssh/id_rsa" ../sunflower-${{ github.ref_name }}.zip version.txt [email protected]:/var/www/updateserver/ | ||
- name: rsync documentation | ||
run: rsync -a -e "ssh -o StrictHostKeyChecking=no -i $HOME/.ssh/id_rsa" --delete documentation [email protected]:/var/www/documentation/ |