-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Switch to GitHub Actions - Part 2 - From within #5088
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
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
2f8ef89
Add integration test GitHub action
flip1995 1158c18
Add clippy_dev checks to GitHub Actions
flip1995 20c3319
Add remark check to GHA
flip1995 2a7a3aa
Rename .remarkrc.json -> .remarkrc and fix file
flip1995 757bbf7
Fix markdown Files
flip1995 d14ee8a
Add Clippy Test (bors) to GHA
flip1995 1717a6f
Ignore fmt test in GHA CI
flip1995 ff8336b
Check if changelog exists
flip1995 f5db351
Get {RUSTUP,MULTIRUST}_{HOME,TOOLCHAIN} from runtime environment
flip1995 66b5e22
Add Clippy Test to GHA
flip1995 9281167
Move integration tests in clippy_bors.yml
flip1995 893e261
Add deployment to GHA
flip1995 8f45387
Small change to comment in .gitignore
flip1995 d7620a3
Add GHA badge to README.md
flip1995 b9580fc
Cancle builds on new commits
flip1995 e59361f
Limit parallel jobs on try/r+ runs
flip1995 935b94d
Sort output of export.py script
flip1995 ea780a6
Extract driver test
flip1995 dfdea56
Extract deployment
flip1995 ab43951
Allow non-ascii characters in changelog check
flip1995 1ceeb13
Build Clippy before running integration tests
flip1995 095287d
Add two more error causes to integration test
flip1995 813d319
Use hash of Cargo.lock file in cache name
flip1995 b8b47ab
Add bors dummy jobs
flip1995 abb095d
Run bors checks unconditionally
flip1995 b47dada
Apply review comments
flip1995 622ece3
Remove deployment from travis
flip1995 2745346
Install all required remark packages in travis
flip1995 a0a21a8
Use nightly cargo to install cargo-cache
flip1995 3fac289
Don't upload target/release in integration_build
flip1995 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add deployment to GHA
- Loading branch information
commit 893e261a99f74b3b925ab66ccfef45acb8b2d82b
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| name: Deploy | ||
|
|
||
| on: | ||
| push: | ||
| branches: master | ||
| release: | ||
| types: [created] | ||
|
|
||
| env: | ||
| TARGET_BRANCH: 'gh-pages' | ||
| SHA: '${{ github.sha }}' | ||
| SSH_REPO: '[email protected]:${{ github.repository }}.git' | ||
| TAG_NAME: '${{ github.event.release.GITHUB_REF }}' | ||
|
|
||
| jobs: | ||
| deploy: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/[email protected] | ||
| - name: Checkout | ||
| uses: actions/[email protected] | ||
| with: | ||
| ref: ${{ env.TARGET_BRANCH }} | ||
| path: 'out' | ||
| - name: Deploy | ||
| run: | | ||
| set -ex | ||
|
|
||
| echo "Removing the current docs for master" | ||
| rm -rf out/master/ || exit 0 | ||
|
|
||
| echo "Making the docs for master" | ||
| mkdir out/master/ | ||
| cp util/gh-pages/index.html out/master | ||
| python ./util/export.py out/master/lints.json | ||
|
|
||
| if [[ -n $TAG_NAME ]]; then | ||
| echo "Save the doc for the current tag ($TAG_NAME) and point current/ to it" | ||
| cp -r out/master "out/$TAG_NAME" | ||
| rm -f out/current | ||
| ln -s "$TAG_NAME" out/current | ||
| fi | ||
|
|
||
| # Generate version index that is shown as root index page | ||
| cp util/gh-pages/versions.html out/index.html | ||
|
|
||
| cd out | ||
| cat <<-EOF | python - > versions.json | ||
| import os, json | ||
| print json.dumps([ | ||
| dir for dir in os.listdir(".") if not dir.startswith(".") and os.path.isdir(dir) | ||
| ]) | ||
| EOF | ||
|
|
||
| # Now let's go have some fun with the cloned repo | ||
| git config user.name "GHA CI" | ||
| git config user.email "[email protected]" | ||
|
|
||
| if git diff --exit-code --quiet; then | ||
| echo "No changes to the output on this push; exiting." | ||
| exit 0 | ||
| fi | ||
|
|
||
| git add . | ||
| git commit -m "Automatic deploy to GitHub Pages: ${SHA}" | ||
|
|
||
| eval "$(ssh-agent -s)" | ||
| ssh-add - <<< "${{ secrets.DEPLOY_KEY }}" | ||
|
|
||
| git push "$SSH_REPO" "$TARGET_BRANCH" | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.