Migrate to Astro (#317) #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Astro Deploy | |
on: | |
workflow_dispatch: | |
push: | |
branches: [master] | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
env: | |
BUILD_PATH: "." | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "*" | |
check-latest: true | |
cache: "pnpm" | |
- name: Setup pages | |
id: pages | |
uses: actions/configure-pages@v3 | |
- run: | | |
pnpm install --frozen-lockfile | |
pnpm build | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: ${{ env.BUILD_PATH }}/dist | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.pages_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |