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

fix: gitee mirror action don't work when push gh-pages only #2742

Merged
merged 1 commit into from
Aug 20, 2020

Conversation

afc163
Copy link
Contributor

@afc163 afc163 commented Aug 11, 2020

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Description of change

See antvis/gatsby-theme-antv#209

@gatsby-cloud
Copy link

gatsby-cloud bot commented Aug 11, 2020

Gatsby Cloud Build Report

🚩 Your build failed. See the build logs here

Errors

API Extractor Error: Error parsing /usr/src/app/www/api-extractor.json:
The "mainEntryPointFilePath" path does not exist: /usr/src/app/www/lib/api.d.ts

@afc163
Copy link
Contributor Author

afc163 commented Aug 11, 2020

/rebase

@afc163 afc163 closed this Aug 11, 2020
@afc163 afc163 reopened this Aug 11, 2020
@@ -16,7 +16,8 @@
"site:develop": "gatsby develop --open -H 0.0.0.0",
"site:build": "npm run site:clean && gatsby build --prefix-paths",
"site:clean": "gatsby clean",
"site:deploy": "npm run site:build && gh-pages -d public",
"site:deploy": "npm run site:build && npm run site:copy-mirror-action && gh-pages -d public",
"site:copy-mirror-action": "mkdir -p public/.github/workflows && cp .github/workflows/mirror.yml public/.github/workflows",
Copy link
Member

Choose a reason for hiding this comment

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

这个是啥原理,把 mirror 的 action 放到 website 的目录中,然后在什么时机去执行这个 action?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

推测原因是 gh-pages 没有 .github/workflows/mirror.yml,所以单独 push 这个分支时不会触发同步 action,解决方式是这个分支里加上这个文件。

@afc163
Copy link
Contributor Author

afc163 commented Aug 12, 2020

/rebase

@afc163 afc163 force-pushed the fix-mirror-gh-pages branch from 203b24a to 03e50b9 Compare August 12, 2020 02:56
@afc163
Copy link
Contributor Author

afc163 commented Aug 12, 2020

需要加个 rebase.yml:https://github.com/cirrus-actions/rebase

@simaQ simaQ merged commit 36ddf10 into master Aug 20, 2020
@simaQ simaQ deleted the fix-mirror-gh-pages branch August 20, 2020 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants