mirror of
https://github.com/barkstone2/vault-to-blog.git
synced 2026-07-22 05:21:19 +00:00
42 lines
No EOL
916 B
YAML
42 lines
No EOL
916 B
YAML
name: Deploy GitHub Pages
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
name: Build and upload artifact
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22.2'
|
|
- name: Install packages
|
|
run: npm ci
|
|
- name: Build
|
|
run: npm run build
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: ./dist
|
|
|
|
deploy:
|
|
name: Deploy Pages
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
pages: write
|
|
id-token: write
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- name: Do deploy Pages
|
|
id: deployment
|
|
if: github.event_name == 'push'
|
|
uses: actions/deploy-pages@v4 |