mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Attempting to make a deployment mirror
This commit is contained in:
26
.github/workflows/pages-mirror.yml
vendored
Normal file
26
.github/workflows/pages-mirror.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Send to the pages mirror
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["v2-docs"]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
mirror:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Making secret key file
|
||||
run: touch ~/mirror_secret
|
||||
- name: Protecting secret key file
|
||||
run: chmod 600 ~/mirror_secret
|
||||
- name: Writing key to secret key file
|
||||
run: echo '${{ secrets.MIRROR_SECRET }}' >> ~/mirror_secret
|
||||
- name: Tweaking git to use the secret key file
|
||||
run: git config --add --local core.sshCommand 'ssh -i ~/mirror_secret'
|
||||
- name: Adding git remote
|
||||
run: git remote add mirror ${{ secrets.MIRROR_ADDRESS }}
|
||||
- name: Renaming git branch
|
||||
run: git branch -m mirror
|
||||
- name: Pushing to git remote
|
||||
run: git push -f mirror
|
||||
43
.github/workflows/pages.yml
vendored
43
.github/workflows/pages.yml
vendored
@@ -1,43 +0,0 @@
|
||||
name: Build and deploy v2 docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["v2-docs"]
|
||||
workflow_dispatch:
|
||||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
- name: Build with Jekyll
|
||||
uses: actions/jekyll-build-pages@v1
|
||||
with:
|
||||
source: ./
|
||||
destination: ./_site
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
Reference in New Issue
Block a user