Skip to content

Improve post text

Improve post text #64

Workflow file for this run

name: Deployment
on:
push:
branches: [main]
workflow_dispatch:
# Allow only one concurrent deployment.
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
name: Build website
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Build website
run: |
npm run build
echo "${{github.sha}} (${{github.ref_name}})" > ./dist/commit.txt
# Make SPA website work with GitHub Pages.
for id in $(grep 'id: "[0-9]*"' ./src/posts.ts | grep -o '[0-9]*'); do
cp ./dist/index.html ./dist/$id.html
done
- name: Upload website
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
deploy-to-github-pages:
needs: build
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
environment:
name: Production
url: ${{steps.deployment.outputs.page_url}}
permissions:
pages: write
id-token: write
steps:
- name: Deploy website to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4