diff --git a/.github/workflows/astro.yml b/.github/workflows/astro.yml index 238ed3e..322a2d7 100644 --- a/.github/workflows/astro.yml +++ b/.github/workflows/astro.yml @@ -3,7 +3,7 @@ name: Deploy Astro site to Pages on: # Runs on pushes targeting the default branch push: - branches: ["main"] + branches: [ "main" ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -58,6 +58,38 @@ jobs: - name: Build run: pnpm run build - - + - name: Upload + uses: actions/upload-pages-artifact@v3 + with: + name: Astro Artifact + dist: ./dist + + - name: Commit and Push + run: | + git add . + git commit -m "docs(astro): deploy to pages" + git push + + + deploy: + # Add a dependency to the build job + needs: build + + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + # Specify runner + deployment step + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4