Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
encse committed Dec 12, 2024
1 parent 3735e5f commit 594ba00
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/update-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Configure Git
run: |
# Configure Git
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Set up Node.js
uses: actions/setup-node@v3
Expand All @@ -31,22 +37,17 @@ jobs:
ls -la
node docs/build.js
- name: Deploy to Docs Branch
run: |
# Configure Git
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# Preserve built files
mv build ..
# Switch to the docs branch
git checkout docs
git rm -rf . || true
cp -r ../build/* .
rm -rf ../build
- name: Checkout docs repository
uses: actions/checkout@v3
with:
path: distr
ref: docs

# Commit and push changes
- name: Deploy docs
run: |
rsync -av --exclude='.git/' --del build/ distr/
cd distr
git add .
git commit -m "Update docs on $(date)"
git push --force origin docs

0 comments on commit 594ba00

Please sign in to comment.