[Olympus News Manager Discord bot] Update Olympus news #378
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: {} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v4 | |
- name: Generate olympusnews/index.txt | |
run: | | |
pushd olympusnews | |
rm -f index.txt | |
for f in *; do | |
echo $f >> index.txt | |
done | |
popd | |
- name: git <setup> && git add && git commit | |
run: | | |
git config user.name '0x0ade'\''s bot' | |
git config user.email '[email protected]' | |
git branch -d gh-pages || true | |
git checkout -b gh-pages | |
git add . | |
git commit -m 'Automatically update gh-pages' | |
- name: git push | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.PUSH_TOKEN }} | |
branch: gh-pages | |
force: true |