Skip to content

Commit

Permalink
modify doc generation workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikopet committed Aug 23, 2024
1 parent 77b1e27 commit e0cec16
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,33 +54,30 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download `doc`
uses: actions/download-artifact@v4
with:
name: doc
path: artifact

- name: Checkout `docs` repository
uses: actions/checkout@v4
with:
repository: versotile-org/docs.versotile.org
ssh-key: ${{ secrets.DOCS_DEPLOY_KEY }}
ref: docs

- name: Clean up docs directory
run: |
cp {docs/,}index.html
rm -r docs/*
mv index.html docs/
cp CNAME docs/
- name: Download `doc`
uses: actions/download-artifact@v4
with:
name: doc
path: docs

- name: Configure Git
- name: Configure git, commit changes and PUSH
run: |
cd docs/
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Commit and push
run: |
git add docs
git fetch origin docs:docs
git checkout docs --
rm -r docs/*
mv ../artifact/* docs/
git add docs/
git checkout main docs/
git status
git commit -m ":rocket: update docs from \`verso\` repository"
git push origin docs
# git push origin docs

0 comments on commit e0cec16

Please sign in to comment.