Merge pull request #103 from s3ich4n/feature/102_geultto_01_19 #21
This file contains hidden or 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 Gatsby blog | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-20.04 | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| # 0을 대입하여 모든 github ref를 읽을 수 있도록 합니다. | |
| with: | |
| fetch-depth: 0 | |
| - name: Setting up Node | |
| uses: actions/setup-node@v3 | |
| - name: Cache dependencies | |
| id: cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: '**/node_modules' | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Install Dependencies | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./public | |
| cname: blog.s3ich4n.me | |
| user_name: 'github-actions[bot]' | |
| user_email: 'github-actions[bot]@users.noreply.github.com' |