Merge branch 'main' of github.com:riceball-tw/astro-blog #86
Workflow file for this run
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
on: [push] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
PUBLIC_GOOGLEANALYTIC_ID: ${{ vars.PUBLIC_GOOGLEANALYTIC_ID }} | |
PUBLIC_YOUTUBEAPIKEY: ${{ secrets.YOUTUBEAPIKEY }} | |
permissions: | |
contents: read | |
deployments: write | |
name: Deploy to Cloudflare Pages | |
steps: | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Git LFS | |
run: git lfs install | |
- name: Fetch Git LFS files | |
run: git lfs fetch | |
- name: Apply Git LFS files to content | |
run: git lfs checkout | |
- name: install packages and build | |
run: | | |
pnpm install | |
pnpm build | |
- name: Publish | |
uses: cloudflare/pages-action@1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: astro-blog | |
directory: dist | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} |