Code N Solve ๐
GitHub Actions1๋ฅผ ์ด์ฉํ ๋ฌธ์ ํด๊ฒฐ๊ณผ ๋ฐฐํฌ ์๋ํ ๐
GitHub Actions๋ ๊ฐ๋ฐ ํ๋ก์ธ์ค๋ฅผ ์๋ํํ์ฌ ๋น๋, ํ ์คํธ, ๋ฐฐํฌ ๋ฑ์ ์ํํ ์ ์๋ ๊ฐ๋ ฅํ ๋๊ตฌ์ด๋ค. ํ์ง๋ง ์ฌ๋ฐ๋ฅธ ์ค์ ์์ด๋ ์ํ๋ ๋๋ก ์๋ํ์ง ์์ ์ ์๋ค. Deployment ์๋ํ๋ฅผ ์ํด GitHub Actions์ Workflow๋ฅผ ์ค์ ํ ๋ ๊ฒช์ ๋ช ๊ฐ์ง ๋ฌธ์ ์ ์ด๋ฅผ ํด๊ฒฐํ๋ ๋ฐฉ๋ฒ์ ๋ํด ์ด์ผ๊ธฐํด๋ณด์.
Blog Deployment ์๋ํ
ํ์ฌ ๋ธ๋ก๊ทธ ํ ๋ง๋ gatsby-starter-hoodie๋ฅผ ํ์ฉํ๊ณ ์๋ค.
์ฌ๊ธฐ์ CI (Continuous Integration)2 ์ฝ๋๋ ์ด๋ฏธ ์์ฑ๋์ด ์๊ณ , Netlify๋ฅผ ํตํ ๋ฐฐํฌ ๋ฐฉ์์ด ์ค๋ช
๋์ด ์์ง๋ง Github Pages๋ฅผ ์ด์ฉํด ๋ฐฐํฌ๋ฅผ ํ๊ณ ์์๋ค.
๋งค๋ฒ $ npm run deploy-gh
๋ช
๋ น์ ํ๊ธฐ ๊ท์ฐฎ์์ ธ ์๋ํ Workflow๋ฅผ ๋ง๋ค๊ธฐ๋ก ๊ฒฐ์ฌํ๋ค.
GitHub Actions Workflow ์ค์
1. GitHub Pages ์๋ ๋ฐฐํฌ34
-
์๋:
-
GitHub Pages์ ์๋์ผ๋ก ๋ฐฐํฌํ๊ธฐ.
์ ๊ธฐ/ํผ์น๊ธฐ
```yaml name: Build and Deploy on: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: "14" - name: Install Dependencies run: npm install - name: Build run: npm run build - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: deploy_key: ${{ secrets.ACCESS_TOKEN }} publish_dir: ./public publish_branch: gh-pages ```
-
-
๋ฌธ์ :
-
Workflow ์ค์ ํ์ผ(deploy.yml)์ ์์ฑํ์ง๋ง Node.js ๋ฒ์ ์ด ๋ฎ์ Gatsby ๋น๋ ์ค ์ค๋ฅ๊ฐ ๋ฐ์ํ๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```bash error Gatsby requires Node.js 18.0.0 or higher (you have v14.21.3). Upgrade Node to the latest stable release: https://gatsby.dev/upgrading-node-js npm ERR! code ELIFECYCLE ```
2. Node.js ๋ฒ์ ์ถฉ๋
-
๋ฌธ์ :
- Workflow ์ค์ ์์๋ 14.21.3 ๋ฒ์ ์ด ์ง์ ๋์ด ์์๋๋ฐ Node.js์ ๋ฒ์ 18.0.0 ์ด์์ ๋น์๋ก ํ์ฌ Gatsby ๋น๋ ์ค ์ค๋ฅ๊ฐ ๋ฐ์ํ๋ค.
-
์๋:
-
Node.js ๋ฒ์ (node-version)์ 20.3.1๋ก ์ ๋ฐ์ดํธํ์๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```yaml name: Build and Deployon: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 20.3.1 - name: Install Dependencies run: npm install - name: Build run: npm run build - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: deploy_key: ${{ secrets.ACCESS_TOKEN }} publish_dir: ./public publish_branch: gh-pages ```
-
-
ํด๊ฒฐ:
- Node.js ๋ฒ์ ์ 20.3.1๋ก ์
๋ฐ์ดํธํ์ฌ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ์ง๋ง ์ดํ์ ํจํค์ง ์์กด์ฑ ์ถฉ๋ ๋ฌธ์ ๊ฐ ๋ฐ์ํ๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```bash Run npm install npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: gatsby-remark-katex@3.10.0 npm ERR! Found: gatsby@5.13.3 npm ERR! node_modules/gatsby npm ERR! gatsby@"^5.11.0" from the root project npm ERR! peer gatsby@"^5.0.0-next" from babel-plugin-remove-graphql-queries@5.13.1 npm ERR! node_modules/babel-plugin-remove-graphql-queries npm ERR! babel-plugin-remove-graphql-queries@"^5.13.1" from gatsby@5.13.3 npm ERR! babel-plugin-remove-graphql-queries@"^5.13.1" from gatsby-plugin-typescript@5.13.1 npm ERR! node_modules/gatsby-plugin-typescript npm ERR! gatsby-plugin-typescript@"^5.13.1" from gatsby@5.13.3 npm ERR! 17 more (gatsby-plugin-catch-links, gatsby-plugin-feed, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer gatsby@"^2.0.0" from gatsby-remark-katex@3.10.0 npm ERR! node_modules/gatsby-remark-katex npm ERR! gatsby-remark-katex@"^3.5.0" from the root project npm ERR! npm ERR! Conflicting peer dependency: gatsby@2.32.13 npm ERR! node_modules/gatsby npm ERR! peer gatsby@"^2.0.0" from gatsby-remark-katex@3.10.0 npm ERR! node_modules/gatsby-remark-katex npm ERR! gatsby-remark-katex@"^3.5.0" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. ```
- Node.js ๋ฒ์ ์ 20.3.1๋ก ์
๋ฐ์ดํธํ์ฌ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ์ง๋ง ์ดํ์ ํจํค์ง ์์กด์ฑ ์ถฉ๋ ๋ฌธ์ ๊ฐ ๋ฐ์ํ๋ค.
3. Node.js ํจํค์ง ์์กด์ฑ ์ถฉ๋ ๋ฐ GitHub ํ ํฐ ์ํฌ๋ฆฟ ๋ฑ๋ก
-
์๋:
-
ํจํค์ง ์์กด์ฑ ์ถฉ๋ ๋ฌธ์ ๋ฅผ --legacy-peer-deps ๋ช ๋ น์ผ๋ก ํด๊ฒฐํ๊ณ GitHub ํ ํฐ์ ์ํฌ๋ฆฟ์ ๋ฑ๋ก์ ํ๊ธฐ๋ก ํ๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```yaml name: Build and Deployon: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 20.3.1 - name: Install Dependencies run: npm install --legacy-peer-deps - name: Build run: npm run build - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: deploy_key: ${{ secrets.ACCESS_TOKEN }} publish_dir: ./public publish_branch: gh-pages ```
-
-
ํด๊ฒฐ:
-
ํ๋กํ - Settings - Developer Settings - Personal access tokens์์ ์์ฑํ ํ ํฐ์ ๋ณต์ฌํ์ฌ ์ ์ฅ์ secrets์ ๋ฑ๋กํ๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```bash Run peaceiris/actions-gh-pages@v3 with: deploy_key: *** publish_dir: ./public publish_branch: gh-pages allow_empty_commit: false keep_files: false force_orphan: false enable_jekyll: false disable_nojekyll: false exclude_assets: .github [INFO] Usage https://github.com/peaceiris/actions-gh-pages#readme Dump inputs [INFO] DeployKey: true [INFO] PublishBranch: gh-pages [INFO] PublishDir: ./public [INFO] DestinationDir: [INFO] ExternalRepository: [INFO] AllowEmptyCommit: false [INFO] KeepFiles: false [INFO] ForceOrphan: false [INFO] UserName: [INFO] UserEmail: [INFO] CommitMessage: [INFO] FullCommitMessage: [INFO] TagName: [INFO] TagMessage: [INFO] EnableJekyll (DisableNoJekyll): false [INFO] CNAME: [INFO] ExcludeAssets .githubSetup auth token [INFO] setup SSH deploy key /usr/bin/chmod 700 /home/runner/.ssh [INFO] wrote /home/runner/.ssh/known_hosts /usr/bin/chmod 600 /home/runner/.ssh/known_hosts [INFO] wrote /home/runner/.ssh/github /usr/bin/chmod 600 /home/runner/.ssh/github [INFO] wrote /home/runner/.ssh/config /usr/bin/chmod 600 /home/runner/.ssh/config /usr/bin/ssh-add /home/runner/.ssh/github Error loading key "/home/runner/.ssh/github": error in libcrypto Error: Action failed with "The process '/usr/bin/ssh-add' failed with exit code 1" ````
-
4. User authenticate using git config
-
์๋:
- token์ secret์ ๋ฑ๋กํ์์ง๋ง token ์ธ์ฆ์ ์คํจํ์ฌ git config ๋ช ๋ น์ ํตํด ์ฌ์ฉ์๋ฅผ ๋ฑ๋กํ์๋ค.
-
๋ฌธ์ :
-
SSH ์ธ์ฆ์ Windows ํ๊ฒฝ์์๋ ์ ์ฉ๋์ง ์๋ ๊ฒ ๊ฐ๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```yaml name: Build and Deployon: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 20.3.1 - name: Install Dependencies run: npm install --legacy-peer-deps - name: Build run: npm run build - name: Deploy to GitHub Pages env: ACCESS_TOKEN: ${{ secrets.PAT }} run: | git config --global user.name "USER NAME" git config --global user.email "USER@EMAIL.COM" npx gh-pages -d ./public -b gh-pages -u $ACCESS_TOKEN ``` </details> - ๋ฌธ์ - git config ๋ช ๋ น์ ํตํด ์ฌ์ฉ์๋ฅผ ๋ฑ๋กํ์ง๋ง ์ค๋ฅ๊ฐ ๋ฐ์ํ๋ค. <details> <summary>์ ๊ธฐ/ํผ์น๊ธฐ</summary> ```bash Run git config --global user.name "USER NAME" git config --global user.name "USER NAME" git config --global user.email "USER@EMAIL.COM" npx gh-pages -d ./public -b gh-pages -u $ACCESS_TOKEN shell: /usr/bin/bash -e {0} env: ACCESS_TOKEN: *** Could not parse name and email from user option "***" (format should be "Your Name <email@example.com>") Error: Process completed with exit code 1. ```
-
5. User authenticate using token
-
์๋:
-
token์ผ๋ก ์ฌ์ฉ์ ์ธ์ฆ์ ์๋ํ์๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```yaml name: Build and Deployon: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 20.3.1 - name: Install Dependencies run: npm install --legacy-peer-deps - name: Build run: npm run build - name: Deploy to GitHub Pages env: ACCESS_TOKEN: ${{ secrets.PAT }} run: | npx gh-pages -d ./public -b gh-pages -u $ACCESS_TOKEN ```
-
-
๋ฌธ์ :
-
๊ฐ์ ๋ฌธ์ ๊ฐ ๋ฐ๋ณต๋์๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```bash Run npx gh-pages -d ./public -b gh-pages -u $ACCESS_TOKEN npx gh-pages -d ./public -b gh-pages -u $ACCESS_TOKEN shell: /usr/bin/bash -e {0} env: ACCESS_TOKEN: *** Could not parse name and email from user option "***" (format should be "Your Name") Error: Process completed with exit code 1. ```
-
6. User authenticate using token 2
-
์๋:
-
ํ ํฐ์ ์ด์ฉํด ์ฌ์ฉ์ ์ธ์ฆ์ ์๋ํ ๋ ์ต์ ์ -u์์ -t๋ก ๋ณ๊ฒฝํด ํ ํฐ์ ์ธ์ํ๋๋ก ํด์ฃผ์๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```yaml name: Build and Deployon: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 20.3.1 - name: Install Dependencies run: npm install --legacy-peer-deps - name: Build run: npm run build - name: Deploy to GitHub Pages env: ACCESS_TOKEN: ${{ secrets.PAT }} run: | npx gh-pages -d ./public -b gh-pages -t $ACCESS_TOKEN ```
-
-
๋ฌธ์ :
-
git config ๋ช ๋ น์ ์ด์ฉํด ์ฌ์ฉ์์ ์ ์์ ์ค์ ํ๋ผ๋ ์ค๋ฅ(Author identity unknown)๋ก ๋ณ๊ฒฝ๋์๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```bash Run npx gh-pages -d ./public -b gh-pages -t $ACCESS_TOKEN npx gh-pages -d ./public -b gh-pages -t $ACCESS_TOKEN shell: /usr/bin/bash -e {0} env: ACCESS_TOKEN: *** Author identity unknown*** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: unable to auto-detect email address (got 'runner@fv-az1535-535.(none)') Error: Process completed with exit code 1. ```
7. User authenticate using git config 2
-
์๋:
-
git config ๋ช ๋ น์ ์ฌ์ฉํด ์ฌ์ฉ์ ์ ๋ณด๋ฅผ ์ธ์ํ ์ ์๋๋ก ํด์ฃผ์๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```yaml name: Build and Deployon: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 20.3.1 - name: Install Dependencies run: npm install --legacy-peer-deps - name: Build run: npm run build - name: Deploy to GitHub Pages env: ACCESS_TOKEN: ${{ secrets.PAT }} run: | git config --global user.email "USER@EMAIL.COM" git config --global user.name "USER NAME" npx gh-pages -d ./public -b gh-pages -t $ACCESS_TOKEN ```
-
-
๋ฌธ์ :
-
Author identity unknown ์ค๋ฅ๋ ๋ฐฐํฌ ์ Git ์ฌ์ฉ์ ์ ๋ณด๋ฅผ ์ค์ ํด๋์ง ์์ ๋ฐ์ํ๋ ์ค๋ฅ๋ก Git์ด ์ปค๋ฐ์ ์์ฑํ ๋ ์ฌ์ฉ์์ ์ ๋ณด๋ฅผ ํ์๋ก ํ๊ธฐ ๋๋ฌธ์ ๋ฐ์ํ๋๋ฐ ๋ฌธ์ ๊ฐ ๋ฐ๋ณต๋์๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```bash Run git config --global user.email "USER@EMAIL.COM" git config --global user.email "USER@EMAIL.COM" git config --global user.name "USER NAME" npx gh-pages -d ./public -b gh-pages -t $ACCESS_TOKEN shell: /usr/bin/bash -e {0} env: ACCESS_TOKEN: *** fatal: could not read Username for 'https://github.com': No such device or addressError: Process completed with exit code 1. ```
-
8. User authenticate using git config 3
-
์๋:
-
HTTPS URL์ ํ ํฐ์ ์ถ๊ฐํ์ฌ ์ฌ์ฉ์๋ฅผ ์ธ์ํ ์ ์๊ฒ ์๋ํ์๋ค.5
์ ๊ธฐ/ํผ์น๊ธฐ
```yaml name: Build and Deployon: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 20.3.1 - name: Install Dependencies run: npm install --legacy-peer-deps - name: Build run: npm run build - name: Deploy to GitHub Pages env: ACCESS_TOKEN: ${{ secrets.PAT }} run: | git config --global url.https://${{ secrets.PAT }}@github.com/.insteadOf https://github.com/ npx gh-pages -d ./public -b gh-pages -t $ACCESS_TOKEN ```
-
-
๋ฌธ์ :
-
์ฌ์ ํ Author identity unknown ์ํ์ด๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```bash Run git config --global url.https://***@github.com/.insteadOf https://github.com/ git config --global url.https://***@github.com/.insteadOf https://github.com/ npx gh-pages -d ./public -b gh-pages -t $ACCESS_TOKEN shell: /usr/bin/bash -e {0} env: ACCESS_TOKEN: *** Author identity unknown\*\*\* Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for <runner@fv-az1118-461.jboa14ee0bjuvjv5ua334yvpdd.cx.internal.cloudapp.net>) not allowed Error: Process completed with exit code 1. ```
-
9. User authenticate using git config 4
-
์๋:
-
๋ค์ git config ๋ช ๋ น์ ์ฌ์ฉํด ์ฌ์ฉ์ ์ ๋ณด๋ฅผ ์ถ๊ฐํ์๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```yaml name: Build and Deployon: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 20.3.1 - name: Install Dependencies run: npm install --legacy-peer-deps - name: Build run: npm run build - name: Deploy to GitHub Pages env: ACCESS_TOKEN: ${{ secrets.PAT }} run: | git config --global user.name "USER NAME" git config --global user.email "USER@EMAIL.COM" npx gh-pages -d ./public -b gh-pages -t $ACCESS_TOKEN ``` </details> - ๋ฌธ์ : - ์ด์ ์ ๋ํ๋ฌ๋ ๋ฌธ์ ๊ฐ ๊ณ์ ๋ํ๋ ๋๋ฌผ์ด ๋ ๋ป ํ๋ค. <details> <summary>์ ๊ธฐ/ํผ์น๊ธฐ</summary> ```bash Run git config --global user.name "USER NAME" git config --global user.name "USER NAME" git config --global user.email "USER@EMAIL.COM" npx gh-pages -d ./public -b gh-pages -t $ACCESS_TOKEN shell: /usr/bin/bash -e {0} env: ACCESS_TOKEN: *** fatal: could not read Username for 'https://github.com': No such device or address ```
-
10. User authenticate using git config 5
-
์๋:
-
ํน์ ํ ํฐ์ด ์ธ์์ด ์๋๊ณ ์๋ ์์ฌ์ค๋ฌ์์ ์์๋ฅผ ๋ณ๊ฒฝํ์ฌ ๋ค์ ์๋ํ์๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```yaml name: Build and Deployon: push: branches: - main jobs: deploy: runs-on: ubuntu-latest env: PAT: ${{ secrets.PAT }} steps: - name: Checkout Repository uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 20.3.1 - name: Install Dependencies run: npm install --legacy-peer-deps - name: Build run: npm run build - name: Deploy to GitHub Pages run: | git config --global url.https://$PAT@github.com/.insteadOf https://github.com/ npx gh-pages -d ./public -b gh-pages -t $PAT ```
-
-
๋ฌธ์ :
-
๋ฌ๋ผ์ง์ง ์์ ์ค๋ฅ ๋ฉ์์ง๊ฐ ๋์ ๋๋ฌผ์ด ๋ฌ๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```bash Run git config --global user.name "USER NAME" git config --global user.name "USER NAME" git config --global user.email "USER@EMAIL.COM" npx gh-pages -d ./public -b gh-pages -t $ACCESS_TOKEN shell: /usr/bin/bash -e {0} env: ACCESS_TOKEN: *** fatal: could not read Username for 'https://github.com': No such device or addressError: Process completed with exit code 1. ```
-
11. User authenticate using git config 6
-
์๋:
-
git config ๋ช ๋ น์ ๋น๋ ๊ณผ์ ์์ ๋ฏธ๋ฆฌ ํด์ฃผ๋ฉด ๋ ๊น ์ถ์ด ์๋ํ์๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```yaml name: Build and Deployon: push: branches: - main jobs: deploy: runs-on: ubuntu-latest env: PAT: ${{ secrets.PAT }} steps: - name: Checkout Repository uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 20.3.1 - name: Install Dependencies run: npm install --legacy-peer-deps - name: Build run: | git config --global url.https://$PAT@github.com/.insteadOf https://github.com/ npm run build - name: Deploy to GitHub Pages run: | npx gh-pages -d ./public -b gh-pages -t $PAT ```
-
-
ํด๊ฒฐ:
- git config ๋ช ๋ น์ deploy ๊ณผ์ ์ด์ ์ ์งํํด์ผ ํ๋ค๋ ๊ฒฐ๋ก ์ ์ป์๋ค.
-
๋ฌธ์ :
-
์ฌ์ ํ Author identity unknow ๋ฌธ์ ๊ฐ ์๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```bash Run npx gh-pages -d ./public -b gh-pages -t $PAT npx gh-pages -d ./public -b gh-pages -t $PAT shell: /usr/bin/bash -e {0} env: PAT: *** Author identity unknown\*\*\* Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: unable to auto-detect email address (got 'runner@fv-az1385-401.(none)') Error: Process completed with exit code 1. ```
-
12. User authenticate using git config 7
-
์๋:
-
git config ๋ช ๋ น์ ํตํ ์ฌ์ฉ์ ์ ๋ณด ์ค์ ๋จ๊ณ๋ฅผ ๋ณ๋๋ก ๋ง๋ค์ด ์ฃผ์๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```yaml name: Build and Deployon: push: branches: - main jobs: deploy: runs-on: ubuntu-latest env: PAT: ${{ secrets.PAT }} steps: - name: Checkout Repository uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 20.3.1 - name: Install Dependencies run: npm install --legacy-peer-deps - name: Build run: npm run build - name: Set Git user information run: git config --global url.https://$PAT@github.com/.insteadOf https://github.com/ - name: Deploy to GitHub Pages run: | npx gh-pages -d ./public -b gh-pages -t $PAT ```
-
-
๋ฌธ์ :
-
๋ค์ ๋๋ฌผ์ด ๋ฌ๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```bash Run npx gh-pages -d ./public -b gh-pages -t $PAT npx gh-pages -d ./public -b gh-pages -t $PAT shell: /usr/bin/bash -e {0} env: PAT: *** Author identity unknown\*\*\* Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for <runner@fv-az914-157.2e4pmxhwlzfuhnev11cd0y0noa.phxx.internal.cloudapp.net>) not allowed Error: Process completed with exit code 1. ```
-
13. User authenticate using git config 8
-
์๋:
-
์ฌ์ฉ์ ์ ๋ณด ๋จ๊ณ์์ ๊ฐ์ง ๋ชจ๋ ์ ๋ณด๋ฅผ ์๋ ค์ฃผ์๋ค.
์ ๊ธฐ/ํผ์น๊ธฐ
```yaml name: Build and Deployon: push: branches: - main jobs: deploy: runs-on: ubuntu-latest env: PAT: ${{ secrets.PAT }} steps: - name: Checkout Repository uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 20.3.1 - name: Install Dependencies run: npm install --legacy-peer-deps - name: Build run: npm run build - name: Set Git user information run: | git config --global user.email "amysun125@gmail.com" git config --global user.name "leekh8" - name: Deploy to GitHub Pages run: | git config --global url.https://$PAT@github.com/.insteadOf https://github.com/ npx gh-pages -d ./public -b gh-pages -t $PAT ```
-
- ์ฑ๊ณต!
Published
- https://docs.github.com/ko/enterprise-server@3.10/actions/learn-github-actionsโฉ
- https://docs.github.com/ko/enterprise-server@3.10/actions/automating-builds-and-tests/about-continuous-integrationโฉ
- https://docs.github.com/ko/enterprise-server@3.10/actions/examples/using-scripts-to-test-your-code-on-a-runnerโฉ
- https://docs.github.com/ko/enterprise-server@3.10/actions/using-workflows/workflow-syntax-for-github-actionsโฉ
- https://github.com/orgs/community/discussions/26580โฉ