about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2020-04-25 21:06:30 +0200
committerGitHub <noreply@github.com>2020-04-25 21:06:30 +0200
commitabbc618d00dcfef9f9321fa19cd5688ce24c1507 (patch)
treedda19db2ca79506f6ec3d0a1d0dd556b1a753788
parente39550e45ec16bb23a868a348f05a95ad6df6b1c (diff)
parent0476e8b48380f0376ff040f07edfe74372ae2101 (diff)
downloadrust-abbc618d00dcfef9f9321fa19cd5688ce24c1507.tar.gz
rust-abbc618d00dcfef9f9321fa19cd5688ce24c1507.zip
Rollup merge of #5517 - flip1995:deploy_time_travel, r=Manishearth
Deploy time travel

Since not only commits to the master branch, but also tags and the beta branch are deployed, we have to be cautious which version of the deploy script is used. GHA always runs the workflow that is commited on the `ref`, that gets tested. For tagged commits. this is 6 weeks outdated workflows/scripts. To prevent this, this workflow first checks out the deploy.sh script, the website templates and all python scripts generating files for the website.

changelog: none
-rw-r--r--.github/workflows/clippy_bors.yml2
-rw-r--r--.github/workflows/deploy.yml6
2 files changed, 6 insertions, 2 deletions
diff --git a/.github/workflows/clippy_bors.yml b/.github/workflows/clippy_bors.yml
index 4429a7c1e5c..6675a1029bb 100644
--- a/.github/workflows/clippy_bors.yml
+++ b/.github/workflows/clippy_bors.yml
@@ -77,8 +77,6 @@ jobs:
       run: |
         sudo dpkg --add-architecture i386
         sudo apt-get update
-        # perform system upgrade to work around https://github.com/rust-lang/rust-clippy/issues/5477 , revert as soon as that is fixed
-        sudo apt-get -y upgrade
         sudo apt-get install gcc-multilib libssl-dev:i386 libgit2-dev:i386
       if: matrix.host == 'i686-unknown-linux-gnu'
 
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 10033daf0ae..f542f9b02c1 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -38,6 +38,12 @@ jobs:
     - name: Set beta to true
       if: github.ref == 'refs/heads/beta'
       run: echo "::set-env name=BETA::true"
+
+    - name: Use scripts and templates from master branch
+      run: |
+        git fetch --no-tags --prune --depth=1 origin master
+        git checkout origin/master -- .github/deploy.sh util/gh-pages/ util/*.py
+
     - name: Deploy
       run: |
         eval "$(ssh-agent -s)"