twitter refresh token #10
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: PUBLISH TO GITHUB PAGES | |
on: | |
push: | |
branches: | |
- main | |
# ここでワークフローに書き込み権限を与える | |
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs | |
permissions: | |
contents: write | |
defaults: | |
run: | |
working-directory: ./ | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [17.x] | |
steps: | |
- run: echo "全てのブランチを clone" | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: publish-site | |
uses: actions/setup-node@v1 | |
with: | |
node-version: v18.17.1 | |
- run: echo "SPA を生成" | |
- run: npm ci | |
working-directory: ./ | |
- run: npm run build | |
working-directory: ./ | |
- run: echo "pub ブランチに変更(GitHub Pages)" | |
- run: git checkout publish --force | |
- run: git pull | |
- run: echo "生成した SPA を publish の docs にコピー" | |
- run: rm -rf ./docs/* | |
- run: cp -r ./dist/* ./docs | |
- run: echo "publish へ push してサイト更新" | |
- run: git config --global user.email "[email protected]" | |
- run: git config --global user.name "BOT" | |
- run: git add ./docs | |
- run: git commit -m "publish site" | |
- run: git push |