Skip to content

Commit 438fe31

Browse files
committed
Revert arch-docs workflow to GitHub Pages
1 parent e92c00e commit 438fe31

File tree

1 file changed

+17
-22
lines changed

1 file changed

+17
-22
lines changed

.github/workflows/arch-docs.yml

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,32 @@ on:
77

88
permissions:
99
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: true
1016

1117
jobs:
1218
build-and-deploy:
1319
runs-on: ubuntu-latest
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deploy.outputs.page_url }}
1423
steps:
1524
- uses: actions/checkout@v4
1625

1726
- uses: supermodeltools/arch-docs@main
1827
id: docs
1928
with:
2029
supermodel-api-key: ${{ secrets.SUPERMODEL_API_KEY }}
21-
base-url: https://repos.supermodeltools.com
30+
base-url: https://supermodeltools.github.io
31+
32+
- uses: actions/upload-pages-artifact@v3
33+
with:
34+
path: ./arch-docs-output
2235

23-
- name: Deploy to central site
24-
env:
25-
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
26-
REPO_NAME: ${{ github.event.repository.name }}
27-
run: |
28-
git config --global user.name "supermodel-bot"
29-
git config --global user.email "bot@supermodeltools.com"
30-
git clone https://x-access-token:${BOT_TOKEN}@github.com/GraphTechnologyDevelopers/graphtechnologydevelopers.github.io.git central-site
31-
rm -rf central-site/site/${REPO_NAME}
32-
mkdir -p central-site/site/${REPO_NAME}
33-
cp -r arch-docs-output/. central-site/site/${REPO_NAME}/
34-
cd central-site
35-
git add site/${REPO_NAME}/
36-
git diff --staged --quiet && echo "No changes" && exit 0
37-
git commit -m "Deploy arch-docs for ${REPO_NAME}"
38-
for i in 1 2 3 4 5; do
39-
git push && break
40-
echo "Push failed, retrying in ${i}0s..."
41-
sleep $((i * 10))
42-
git pull --rebase origin main
43-
done
36+
- name: Deploy to GitHub Pages
37+
id: deploy
38+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)