-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Travis CI #596
base: master
Are you sure you want to change the base?
Add Travis CI #596
Conversation
這個改動有點大,能說明詳細一點,給沒用過 Travis CI 的人了解嗎? |
除了 CNAME 外的新檔案擋頭補一下註解? |
This reverts commit 9ed1c06.
新檔案檔頭 已經加上註解 並已寫好加入 patch |
@yoyo930021 有改了 package.json,那本機跑 npm start 開發環境會被影響嗎? |
github_token: $GITHUB_TOKEN | ||
local_dir: dist/moztw.org/ | ||
on: | ||
branch: production |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是不是要 deploy 到 gh-pages 去?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
這邊沒錯 它的意思是 deploy 要基於 production branch
如果不是 不要部署
https://docs.travis-ci.com/user/deployment
CNAME
Outdated
@@ -0,0 +1 @@ | |||
moztw.org |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
測試期間先指到 beta.moztw.space
等正式要轉移我再去請 piaip 幫忙改 DNS 設定
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好 等等有空修
不會影響舊有的 npm run start |
有發現新 bug 會在晚一點修 |
should use GitHub Actions instead. Run diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
new file mode 100644
index 00000000..9d442aca
--- /dev/null
+++ b/.github/workflows/gh-pages.yml
@@ -0,0 +1,46 @@
+name: Build and Deploy to GitHub Pages
+
+on:
+ push:
+ branches:
+ - master
+
+permissions:
+ pages: write
+ id-token: write
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout 🛎️
+ uses: actions/[email protected]
+
+ - name: Setup Pages 🔧
+ id: pages
+ uses: actions/[email protected]
+
+ - name: Install Yarn 🔨
+ run: |
+ npm install -g yarn
+
+ - name: Install and Build 🔨
+ run: |
+ yarn
+ yarn build
+
+ - name: Upload artifact 📦️
+ uses: actions/[email protected]
+ with:
+ path: build
+
+ deploy:
+ environment:
+ name: github-pages
+ url: ${{steps.deployment.outputs.page_url}}
+ runs-on: ubuntu-latest
+ needs: build
+ steps:
+ - name: Deploy to GitHub Pages 🚀
+ id: deployment
+ uses: actions/[email protected] |
No description provided.