Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Simple workflow for deploying static content to GitHub Pages
- name: deploy
- on:
- # Runs on pushes targeting the default branch
- push:
- branches: ['main']
- # Allows you to run this workflow manually from the Actions tab
- workflow_dispatch:
- # Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
- permissions:
- contents: read
- pages: write
- id-token: write
- # Allow one concurrent deployment
- concurrency:
- group: 'pages'
- cancel-in-progress: true
- jobs:
- deploy:
- environment:
- name: github-pages
- url: ${{ steps.deployment.outputs.page_url }}
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - uses: pnpm/action-setup@v2
- name: Install pnpm
- id: pnpm-install
- with:
- version: latest
- run_install: false
- - name: Get pnpm store directory
- id: pnpm-cache
- shell: bash
- run: |
- echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- - uses: actions/cache@v3.2.2
- name: Setup pnpm cache
- with:
- path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
- key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
- restore-keys: |
- ${{ runner.os }}-pnpm-store-
- - name: Install dependencies
- run: pnpm install
- - name: Build
- run: pnpm build
- - name: Setup Pages
- uses: actions/configure-pages@v3.0.6
- - name: Upload artifact
- uses: actions/upload-pages-artifact@v2
- with:
- # Upload dist repository
- path: './dist'
- - name: Deploy to GitHub Pages
- id: deployment
- uses: actions/deploy-pages@v2.0.4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement