Files
shipped/.github/workflows/publish.yml
Morten Olsen b574c375af init
2023-05-21 00:01:16 +02:00

61 lines
1.4 KiB
YAML

name: Deploy static content to Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- name: Setup corepack
run: corepack enable
- name: setup pnpm config
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
- name: Install
run: pnpm install
- name: Build
run: pnpm run build
env:
ASSET_URL: 'https://mortenolsen.pro/shipped'
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './packages/website/dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2