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 6d5a004
Showing 1 changed file with 13 additions and 20 deletions.
33 changes: 13 additions & 20 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,33 +54,26 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- 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
path: artifact

- name: Configure Git
- name: Checkout `docs` repository, commit & push
uses: actions/checkout@v4
with:
repository: versotile-org/docs.versotile.org
ssh-key: ${{ secrets.DOCS_DEPLOY_KEY }}
path: docs
run: |
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 checkout docs
rm -r docs/*
mv ../artifact/* docs/
git add docs/
git checkout main docs/
git commit -m ":rocket: update docs from \`verso\` repository"
git push origin docs

0 comments on commit 6d5a004

Please sign in to comment.