use automate token #1
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: Ruby | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2.5 | |
- name: Build and update stateofthemap.jp | |
run: | | |
gem install bundler | |
bundle install --jobs 4 --retry 3 | |
bundle exec jekyll build -b 2024 | |
rm -rf ../stateothemap.master | |
git clone https://[email protected]/osmfj/stateofthemap ../stateofthemap.master | |
mkdir -p ../stateofthemap.master/2024/ | |
cp -R 2024/* ../stateofthemap.master/2024/ | |
cd ../stateofthemap.master | |
git config user.email [email protected] | |
git config user.name "OSMFJ automated builder" | |
git add -A 2024 | |
git commit -m "Update from github ci sotmjp2024/${{ github.sha }}" | |
git push --quiet origin master > /dev/null 2>&1 | |
env: | |
gh_token: ${{ secrets.GITHUB_TOKEN }} | |