Skip to content

Commit 91758c2

Browse files
committed
Create folder before copying
1 parent 8992aef commit 91758c2

File tree

2 files changed

+31
-9
lines changed

2 files changed

+31
-9
lines changed

.github/workflows/deploy-arisamiga.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,26 @@ jobs:
1818
deploy:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- name: Checkout
21+
- name: Checkout Arisamiga branch
2222
uses: actions/checkout@v4
23+
with:
24+
ref: Arisamiga
2325

24-
- name: Deploy to GitHub Pages Branch
25-
env:
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
- name: Setup Git
2727
run: |
2828
git config --global user.name 'github-actions[bot]'
2929
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
30+
31+
- name: Checkout gh-pages branch
32+
run: |
3033
git clone --depth 1 --branch gh-pages https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} gh-pages
34+
35+
- name: Copy contents to root folder
36+
run: |
3137
rsync -av --delete ./Website/ gh-pages/
38+
39+
- name: Commit and push changes
40+
run: |
3241
cd gh-pages
3342
git add .
3443
git commit -m "Deploy Arisamiga branch"

.github/workflows/deploy-main.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,30 @@ jobs:
1818
deploy:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- name: Checkout
21+
- name: Checkout main branch
2222
uses: actions/checkout@v4
23+
with:
24+
ref: main
2325

24-
- name: Deploy to GitHub Pages Branch
25-
env:
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
- name: Setup Git
2727
run: |
2828
git config --global user.name 'github-actions[bot]'
2929
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
30+
31+
- name: Checkout gh-pages branch
32+
run: |
3033
git clone --depth 1 --branch gh-pages https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} gh-pages
31-
rsync -av --delete ./Website/ gh-pages/website/demo/
34+
35+
- name: Create demo directory
36+
run: |
37+
mkdir -p gh-pages/demo
38+
39+
- name: Copy contents to demo folder
40+
run: |
41+
rsync -av --delete ./Website/ gh-pages/demo/
42+
43+
- name: Commit and push changes
44+
run: |
3245
cd gh-pages
3346
git add .
3447
git commit -m "Deploy main branch to demo"

0 commit comments

Comments
 (0)