mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-26 00:42:18 +00:00
update draft
This commit is contained in:
parent
be8d5dea65
commit
524b912dd8
1 changed files with 50 additions and 5 deletions
|
@ -11,8 +11,10 @@ categories: Backstage
|
||||||
tags:
|
tags:
|
||||||
- hugo
|
- hugo
|
||||||
- meta
|
- meta
|
||||||
|
- serverless
|
||||||
---
|
---
|
||||||
Neocities: https://neocities.org/about
|
|
||||||
|
|
||||||
|
|
||||||
Supporter: https://neocities.org/supporter
|
Supporter: https://neocities.org/supporter
|
||||||
|
|
||||||
|
@ -39,7 +41,7 @@ Hugo starter workflow: https://github.com/actions/starter-workflows/blob/main/pa
|
||||||
```yaml
|
```yaml
|
||||||
# torchlight! {"lineNumbers": true}
|
# torchlight! {"lineNumbers": true}
|
||||||
# .github/workflows/deploy-to-neocities.yml
|
# .github/workflows/deploy-to-neocities.yml
|
||||||
name: Deploy to neocities
|
name: Deploy to Neocities
|
||||||
|
|
||||||
# only run on changes to main
|
# only run on changes to main
|
||||||
on:
|
on:
|
||||||
|
@ -57,7 +59,8 @@ defaults:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
build:
|
||||||
|
name: Build Hugo site
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
HUGO_VERSION: "0.121.1"
|
HUGO_VERSION: "0.121.1"
|
||||||
|
@ -81,12 +84,54 @@ jobs:
|
||||||
HUGO_ENV: production
|
HUGO_ENV: production
|
||||||
run: |
|
run: |
|
||||||
hugo \
|
hugo \
|
||||||
--minify \
|
--minify
|
||||||
--baseURL "https://runtimeterror.dev/"
|
- name: Insert 404 page
|
||||||
|
run: |
|
||||||
|
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
|
||||||
|
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
|
- name: Deploy to neocities
|
||||||
uses: bcomnes/deploy-to-neocities@v1
|
uses: bcomnes/deploy-to-neocities@v1
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Reference in a new issue