diff --git a/.github/workflows/push-main.yml b/.github/workflows/push-main.yml index e760ee2..4368421 100644 --- a/.github/workflows/push-main.yml +++ b/.github/workflows/push-main.yml @@ -72,7 +72,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - deploy: + build: needs: [lint, typecheck] runs-on: ubuntu-latest @@ -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