Continuous Deployment #14
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: Continuous Deployment | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
Contributors: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: wow-actions/contributors-list@v1 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
round: true | |
svgPath: images/CONTRIBUTORS.svg | |
Deploy: | |
needs: Contributors | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.0 | |
- name: Install dependencies | |
run: gem install erb yaml | |
- name: Run app | |
run: | | |
ruby ./scripts/erb.rb | |
- name: Make last_change | |
run: date > ./scripts/last_change | |
- name: Commit files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "WHW" | |
git add README.md ./scripts/last_change | |
git add ./categorize/* | |
git commit -m "Deploy README.md and Categorize Docs" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |