49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
name: Build and deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Prepare environment
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- run: npm install --global pnpm
|
|
|
|
- name: Install deps
|
|
run: pnpm m i
|
|
|
|
- name: Build plugin(s)
|
|
run: node ./build.mjs
|
|
|
|
- name: Copy additional files
|
|
run: |
|
|
cp README.md dist/README.md
|
|
printf -- "---\npermalink: /404.html\n---\n" > dist/404.md
|
|
printf -- "> **Note:** You accessed a link that returned a 404, probably by clicking one of the plugin links. You're supposed to copy the link address and add it into Vendetta.\n\n" >> dist/404.md
|
|
cat README.md >> dist/404.md
|
|
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@v4
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: ./dist
|
|
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|