Skip to content

Mirror Website

Mirror Website #8

Workflow file for this run

name: Mirror Website
on:
schedule:
- cron: '0 1 * * *'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout MineBuilders/.github repository (source repository)
uses: actions/checkout@v2
with:
repository: MineBuilders/.github
ref: gh-pages
token: ${{ secrets.GITHUB_TOKEN }}
path: temp-repo
- run: |
pwd
ls -R
- name: Checkout the current repository (destination repository)
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- run: |
pwd
ls -R
- name: Copy files from MineBuilders/.github to current repository
run: |
cp -r ./temp-repo/* .
- name: Commit and push to the main branch
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com'
git add .
git commit -m "Deploy website from MineBuilders/.github repository to main"
git push origin main