Skip to content
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

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Add Travis CI #596

wants to merge 20 commits into from

Conversation

yoyo930021
Copy link

No description provided.

@irvin
Copy link
Member

irvin commented Jun 27, 2018

這個改動有點大,能說明詳細一點,給沒用過 Travis CI 的人了解嗎?
另外也在 Readme 中解釋一下整個流程?

@irvin
Copy link
Member

irvin commented Jun 27, 2018

除了 CNAME 外的新檔案擋頭補一下註解?

@yoyo930021
Copy link
Author

新檔案檔頭 已經加上註解
Readme 也補上相關說明

並已寫好加入 patch

@irvin
Copy link
Member

irvin commented Jun 28, 2018

@yoyo930021 有改了 package.json,那本機跑 npm start 開發環境會被影響嗎?

@irvin irvin self-requested a review June 28, 2018 03:03
github_token: $GITHUB_TOKEN
local_dir: dist/moztw.org/
on:
branch: production
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是不是要 deploy 到 gh-pages 去?

Copy link
Author

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
Copy link
Member

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 設定

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好 等等有空修

@yoyo930021
Copy link
Author

不會影響舊有的 npm run start

@yoyo930021
Copy link
Author

有發現新 bug 會在晚一點修

@irvin irvin added this to the 網頁搬移至 github pages milestone Jun 28, 2018
@mingtsay
Copy link
Contributor

should use GitHub Actions instead.

Run git apply and paste the following code into your terminal to create the workflow file.

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]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants