Skip to content

Commit

Permalink
updated deploy workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
beatfactor committed Apr 1, 2024
1 parent b51aca5 commit a93ecd7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Build and Deploy to Preview
name: Build and Deploy to preview

on:
push:
branches:
- 'preview'

- 'versions/3.0'
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -27,11 +27,14 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
node-version: '20'

- name: Install dependencies
run: npm install

- name: Run eslint
run: npm run eslint

- name: Build the website
run: npm run build

Expand All @@ -47,4 +50,4 @@ jobs:
echo "${{ secrets.PROD_DEPLOY_SECRET }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan ${{ env.REMOTE_SERVER }} >> ~/.ssh/known_hosts
rsync -azP --delete ./out/ ${{ env.REMOTE_USER }}@${{ env.REMOTE_SERVER }}:${{ secrets.REMOTE_PREVIEW_DIRECTORY }}
rsync -azP --delete ./out/ ${{ env.REMOTE_USER }}@${{ env.REMOTE_SERVER }}:${{ secrets.REMOTE_PREVIEW_DIRECTORY }}
11 changes: 6 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Build and Deploy
name: Build and Deploy to prod

on:
push:
branches:
- 'versions/3.0'
workflow_dispatch:

jobs:
build:
Expand All @@ -26,11 +24,14 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
node-version: '20'

- name: Install dependencies
run: npm install

- name: Run eslint
run: npm run eslint

- name: Build the website
run: npm run build

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"optimize": "node build/optimize.js",
"netlify": "npm run clone:docs && npm run clone:nightwatch && npm run build",
"partytown": "partytown copylib public/~partytown",
"eslint": "eslint src test --quiet"
"eslint": "eslint src --quiet"
},
"author": "Andrei Rusu <[email protected]>",
"license": "MIT",
Expand Down

0 comments on commit a93ecd7

Please sign in to comment.