Skip to content

Commit b01aac0

Browse files
authored
Simplify GHA (#340)
1 parent 9d79508 commit b01aac0

File tree

1 file changed

+5
-40
lines changed

1 file changed

+5
-40
lines changed

.github/workflows/ibis.yml

Lines changed: 5 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -126,44 +126,9 @@ jobs:
126126
env:
127127
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
128128

129-
deploy-pages:
130-
needs: build
131-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
132-
environment:
133-
name: github-pages
134-
url: ${{ steps.deployment.outputs.page_url }}
135-
runs-on: ubuntu-latest
136-
steps:
137-
- name: Checkout repository
138-
uses: actions/checkout@v4
139-
140-
- name: Setup PHP
141-
uses: shivammathur/setup-php@v2
142-
with:
143-
php-version: '8.2'
144-
extensions: gd, zip, mbstring
145-
coverage: none
146-
147-
- name: Install dependencies
148-
run: composer install --prefer-dist --no-progress --no-dev --optimize-autoloader
149-
150-
- name: Generate HTML for Pages
151-
run: composer run html
152-
153-
- name: Create Pages directory
129+
- name: Commit and push HTML for Pages
130+
if: steps.verify-changed-files.outputs.changed == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
154131
run: |
155-
mkdir -p _site
156-
cp ebook/en/export/101-linux-commands.html _site/index.html
157-
cp ebook/en/export/101-linux-commands.html index.html
158-
159-
- name: Setup Pages
160-
uses: actions/configure-pages@v4
161-
162-
- name: Upload to GitHub Pages
163-
uses: actions/upload-pages-artifact@v3
164-
with:
165-
path: _site
166-
167-
- name: Deploy to GitHub Pages
168-
id: deployment
169-
uses: actions/deploy-pages@v4
132+
git add index.html
133+
git commit -m "🌐 Auto-update GitHub Pages HTML [skip ci]" || exit 0
134+
git push

0 commit comments

Comments
 (0)