mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-09 17:42:19 +00:00
configure preview builds on neocities
This commit is contained in:
parent
c898f8ebe5
commit
a58119ea21
3 changed files with 49 additions and 0 deletions
46
.github/workflows/deploy-preview-to-neocities.yml
vendored
Normal file
46
.github/workflows/deploy-preview-to-neocities.yml
vendored
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
name: Deploy to Neocities
|
||||||
|
|
||||||
|
# only run on changes to preview
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- preview
|
||||||
|
|
||||||
|
concurrency: # prevent concurrent deploys doing strange things
|
||||||
|
group: deploy-preview-to-neocities
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
# Default to bash
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
name: Build and deploy Hugo site
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Hugo setup
|
||||||
|
uses: peaceiris/actions-hugo@v2.6.0
|
||||||
|
with:
|
||||||
|
hugo-version: '0.121.1'
|
||||||
|
extended: true
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Build with Hugo
|
||||||
|
run: hugo --minify
|
||||||
|
- name: Insert 404 page
|
||||||
|
run: |
|
||||||
|
cp public/404/index.html public/not_found.html
|
||||||
|
- name: Highlight with Torchlight
|
||||||
|
run: |
|
||||||
|
npm i @torchlight-api/torchlight-cli
|
||||||
|
npx torchlight
|
||||||
|
- name: Deploy to Neocities
|
||||||
|
uses: bcomnes/deploy-to-neocities@v1
|
||||||
|
with:
|
||||||
|
api_token: ${{ secrets.NEOCITIES_PREVIEW_API_TOKEN }}
|
||||||
|
cleanup: true
|
||||||
|
dist_dir: public
|
1
config/preview/hugo.toml
Normal file
1
config/preview/hugo.toml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
baseURL = "https://preview--runtimeterror.neocities.org/"
|
2
config/preview/params.toml
Normal file
2
config/preview/params.toml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
comments = false
|
||||||
|
analytics = false
|
Loading…
Reference in a new issue