pbw-explore/.github/workflows/gh-pages.yml

56 řádky
1.3 KiB
YAML
Surový Normální zobrazení Historie

2023-01-24 02:20:11 +01:00
name: GitHub Pages
on:
push:
branches:
2023-01-30 04:04:13 +01:00
- main # Set a branch name to trigger deployment
2023-02-24 08:39:39 +01:00
workflow_dispatch:
2023-01-24 02:20:11 +01:00
jobs:
2023-02-24 08:57:55 +01:00
build:
runs-on: ubuntu-latest
2023-01-24 02:20:11 +01:00
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
with:
2023-01-30 04:04:13 +01:00
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
2023-01-24 02:20:11 +01:00
- uses: actions/setup-node@v3
with:
2023-02-05 16:27:14 +01:00
node-version: 19
2023-01-24 02:20:11 +01:00
- name: Install dependencies
run: npm ci
2023-01-24 04:59:17 +01:00
- run: rm src/lib/data.json && wget -O src/lib/data.json https://data.prgblockweek.com/23/index.json
2023-01-24 04:56:27 +01:00
2023-01-24 02:20:11 +01:00
- name: Build
run: npm run build
2023-01-30 04:04:13 +01:00
2023-01-24 02:20:11 +01:00
- name: Add custom domain
2023-01-30 04:04:13 +01:00
run: 'touch build/CNAME && echo "explore.prgblockweek.com" >> build/CNAME'
2023-01-24 02:20:11 +01:00
2023-02-24 08:57:55 +01:00
- uses: actions/configure-pages@v3
- uses: actions/upload-pages-artifact@v1
2023-01-24 02:20:11 +01:00
with:
2023-02-24 08:57:55 +01:00
path: 'build'
deploy:
needs: [build]
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1