mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-22 06:52:18 +00:00
first swing at deploying to neocities
This commit is contained in:
parent
31f90b6446
commit
698762cc86
1 changed files with 54 additions and 0 deletions
54
.github/workflows/deploy-to-neocities.yml
vendored
Normal file
54
.github/workflows/deploy-to-neocities.yml
vendored
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
name: Deploy to neocities
|
||||||
|
|
||||||
|
# only run on changes to main
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
concurrency: # prevent concurrent deploys doing strange things
|
||||||
|
group: deploy-to-neocities
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
# Default to bash
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
HUGO_VERSION: "0.121.1"
|
||||||
|
steps:
|
||||||
|
- name: Install Hugo CLI
|
||||||
|
run: |
|
||||||
|
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
|
||||||
|
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
|
||||||
|
- name: Install Dart Sass
|
||||||
|
run: sudo snap install dart-sass
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Install Node.js dependencies
|
||||||
|
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
|
||||||
|
- name: Build with Hugo
|
||||||
|
env:
|
||||||
|
# For maximum backward compatibility with Hugo modules
|
||||||
|
HUGO_ENVIRONMENT: production
|
||||||
|
HUGO_ENV: production
|
||||||
|
run: |
|
||||||
|
hugo \
|
||||||
|
--minify \
|
||||||
|
--baseURL "https://codesplice.neocities.org/"
|
||||||
|
- name: Highlight with Torchlight
|
||||||
|
run: |
|
||||||
|
npm i @torchlight-api/torchlight-api
|
||||||
|
npx torchlight
|
||||||
|
- name: Deploy to neocities
|
||||||
|
uses: bcomnes/deploy-to-neocities@v1
|
||||||
|
with:
|
||||||
|
api_token: ${{ secrets.NEOCITIES_API_TOKEN }}
|
||||||
|
cleanup: true
|
||||||
|
dist_dir: public
|
Loading…
Reference in a new issue