diff --git a/.github/workflows/continuous_deployment.yml b/.github/workflows/continuous_deployment.yml index df837d1..03bde3f 100644 --- a/.github/workflows/continuous_deployment.yml +++ b/.github/workflows/continuous_deployment.yml @@ -2,19 +2,39 @@ name: Deploy demo on: push: branches: [main] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false jobs: - release: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 - - uses: actions/setup-node@v3 + - name: Run build + uses: actions/setup-node@v3 + run: cd airmail_site && yarn install && yarn build - - run: cd airmail_site && yarn install && yarn build + - name: Setup Pages + uses: actions/configure-pages@v4 - - uses: peaceiris/actions-gh-pages@v3 - if: github.ref == 'refs/heads/main' + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./airmail_site/dist \ No newline at end of file + path: 'airmail_site/dist' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4