Added action to deploy main branch to Github Pages

This commit is contained in:
Marcel Hellkamp 2023-07-15 09:25:11 +02:00
parent 1a5091ca43
commit b7e89e8334
2 changed files with 54 additions and 0 deletions

9
.github/workflows/demo-config.json vendored Normal file
View File

@ -0,0 +1,9 @@
{
"server": "mastodon.social",
"tags": ["foss", "cats", "dogs", "fediwall"],
"accounts": ["defnull@chaos.social"],
"limit": 20,
"interval": 10,
"theme": "dark",
"info": "top"
}

45
.github/workflows/deploy-pages.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: Deploy demo site to GitHub Pages
on:
push:
branches: ["main"]
workflow_dispatch:
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Fetch dependencies
run: npm ci
- name: Copy demo config
run: cp .github/workflows/demo-config.json public/wall-config.json
- name: Build
run: npm run build -- --base=/fediwall/
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: dist/
deploy:
needs: build
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2