chore: Switch yarn to pnpm #88
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: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- 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: | | |
npm install | |
npm run 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 }} |