-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.09 KB
/
mirror.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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