Skip to content

Commit

Permalink
Merge pull request #201 from etra0/master
Browse files Browse the repository at this point in the history
use checkout to clone framedsc site & change target dir.
  • Loading branch information
etra0 authored Oct 22, 2024
2 parents de99550 + f74d34f commit 75a11bc
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,17 @@ jobs:
persist-credentials: false
token: ${{ secrets.GITHUB_TOKEN }}

- name: Clone framedsc site repo.
uses: actions/checkout@v2
with:
repository: framedsc/framedsc.github.io
persist-credentials: false
path: ./_framedsc.github.io
token: ${{ secrets.GITHUB_TOKEN }}

- name: Build site
shell: cmd
run: |
git clone [email protected]:framedsc/framedsc.github.io.git %GITHUB_WORKSPACE%/../framedsc.github.io
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
.\tools\docnet -c markdown
Expand All @@ -35,16 +42,16 @@ jobs:
echo Executing pre-generate-site hooks scripts
PowerShell -ExecutionPolicy Bypass -File "tools\generate-site-hooks\generatebannerspage.ps1"
del /q ..\framedsc.github.io\*.*
for /d %%i in (..\framedsc.github.io\*.*) do @rd /s /q "%%i"
del /q ..\_framedsc.github.io\*.*
for /d %%i in (.\_framedsc.github.io\*.*) do @rd /s /q "%%i"
copy /y theme\destination\favicon.ico .\site
robocopy .\site ..\framedsc.github.io /s /e
robocopy .\site ..\_framedsc.github.io /s /e
if ErrorLevel 8 (exit /B 1) else (exit /B 0)
- name: Submit site
run: |
cd $env:GITHUB_WORKSPACE
cd ..\framedsc.github.io
cd .\_framedsc.github.io
git add -A
git commit -m "${{ github.event.head_commit.message }}"
git push

0 comments on commit 75a11bc

Please sign in to comment.