Skip to content

Commit

Permalink
chore: set git user for deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
rfoel committed Nov 1, 2022
1 parent 482a296 commit 1077467
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/push-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

deploy:
build:
needs: [lint, typecheck]
runs-on: ubuntu-latest

Expand All @@ -88,23 +88,29 @@ jobs:
with:
node-version: 16

- name: πŸ‘€ Env
run: |
echo "Event name: ${{ github.event_name }}"
echo "Git ref: ${{ github.ref }}"
echo "GH actor: ${{ github.actor }}"
echo "SHA: ${{ github.sha }}"
VER=`node --version`; echo "Node ver: $VER"
VER=`npm --version`; echo "npm ver: $VER"
- name: πŸ“₯ Download deps
uses: bahmutov/npm-install@v1

- name: πŸ— Build
run: npm run build

- uses: actions/upload-pages-artifact@v1
with:
path: ./dist

deploy:
needs: [build]
runs-on: ubuntu-latest
environment:
name: github-pages
permissions:
contents: read
pages: write
id-token: write

steps:
- name: πŸ›‘ Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0

- name: πŸš€ Production Deploy
run: npm run deploy
env:
CI: true
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
uses: actions/deploy-pages@v1

0 comments on commit 1077467

Please sign in to comment.