Skip to content

deploy ci

deploy ci #1

Workflow file for this run

name: Build and deploy
on:
push:
branches:
- main
jobs:
build-static:
runs-on: [self-hosted, Linux]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
cache-dependency-path: "**/pnpm-lock.yaml"
- name: Install deps
run: pnpm install --frozen-lockfile
- name: Build site
run: pnpm build
- name: Fix permissions
run: |
chmod -c -R +rX "dist/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: "dist/"
deploy:
needs: build-static
runs-on: [self-hosted, Linux]
if: github.ref == 'refs/heads/main'
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy pages
id: deployment
uses: actions/deploy-pages@v4