Skip to content

Add "live" branch

Add "live" branch #30

Workflow file for this run

name: Deploy TypeScript website to GitHub Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
id-token: write
pages: write
contents: write
jobs:
deploy:
runs-on: ubuntu-22.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download repository
uses: actions/checkout@v4
- name: Build TypeScript
run: tsc
- name: Run custom build script
run: python3 build.py "${{ secrets.SECRET_STRING }}"
- name: Compress & Upload pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: "./www" # Website root
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Squash merge onto live branch
run: |
git config --global user.name "Page deployment manager"
git config --global user.email "videocreator@outlook.de"
git config --global user.password "${{ github.token }}"
git switch --orphan live
git add .
git commit -m "Update to latest live version"
git push -fu origin live