mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-26 08:52:18 +00:00
Merge branch 'main' into drafts
This commit is contained in:
commit
12d0259442
1 changed files with 10 additions and 61 deletions
71
.github/workflows/deploy-to-neocities.yml
vendored
71
.github/workflows/deploy-to-neocities.yml
vendored
|
@ -16,82 +16,31 @@ defaults:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
deploy:
|
||||||
name: Build Hugo site
|
name: Build and deploy Hugo site
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
HUGO_VERSION: "0.121.1"
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Hugo CLI
|
- name: Hugo setup
|
||||||
run: |
|
uses: peaceiris/actions-hugo@v2.6.0
|
||||||
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
|
with:
|
||||||
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
|
hugo-version: '0.121.1'
|
||||||
- name: Install Dart Sass
|
extended: true
|
||||||
run: sudo snap install dart-sass
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Install Node.js dependencies
|
|
||||||
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
|
|
||||||
- name: Build with Hugo
|
- name: Build with Hugo
|
||||||
env:
|
run: hugo --minify
|
||||||
# For maximum backward compatibility with Hugo modules
|
|
||||||
HUGO_ENVIRONMENT: production
|
|
||||||
HUGO_ENV: production
|
|
||||||
run: |
|
|
||||||
hugo \
|
|
||||||
--minify
|
|
||||||
- name: Insert 404 page
|
- name: Insert 404 page
|
||||||
run: |
|
run: |
|
||||||
cp public/not_found/index.html public/not_found.html
|
cp public/not_found/index.html public/not_found.html
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: build
|
|
||||||
path: public
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
highlight:
|
|
||||||
name: Highlight code with Torchlight
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: build
|
|
||||||
steps:
|
|
||||||
- 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: Download artifact
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: build
|
|
||||||
path: public
|
|
||||||
- name: Highlight with Torchlight
|
- name: Highlight with Torchlight
|
||||||
run: |
|
run: |
|
||||||
npm i @torchlight-api/torchlight-cli
|
npm i @torchlight-api/torchlight-cli
|
||||||
npx torchlight
|
npx torchlight
|
||||||
- name: Upload artifact
|
- name: Deploy to Neocities
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: highlight
|
|
||||||
path: public
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
name: Publish to Neocities
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: highlight
|
|
||||||
steps:
|
|
||||||
- name: Download artifact
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: highlight
|
|
||||||
path: public
|
|
||||||
- name: Deploy to neocities
|
|
||||||
uses: bcomnes/deploy-to-neocities@v1
|
uses: bcomnes/deploy-to-neocities@v1
|
||||||
with:
|
with:
|
||||||
api_token: ${{ secrets.NEOCITIES_API_TOKEN }}
|
api_token: ${{ secrets.NEOCITIES_API_TOKEN }}
|
||||||
cleanup: false
|
cleanup: true
|
||||||
dist_dir: public
|
dist_dir: public
|
Loading…
Reference in a new issue