Update test.txt #9
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: Deploy to GitHub Pages (develop) | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' # プロジェクトに合わせてNode.jsのバージョンを指定 | |
- name: Install Dependencies | |
run: pnpm install # または npm install | |
- name: Build | |
run: npm run build # または pnpm run build | |
- name: Fetch and checkout gh-pages branch | |
run: | | |
git fetch origin gh-pages:gh-pages | |
git checkout gh-pages | |
- name: Deploy to /dev directory | |
run: | | |
git checkout gh-pages | |
mkdir -p dev | |
cp -r dist/* dev/ | |
git add dev | |
git commit -m "Deploy develop branch to /dev directory" | |
git push origin gh-pages |