Skip to content

Merge pull request #734 from rust-lang/improve-index-item #53

Merge pull request #734 from rust-lang/improve-index-item

Merge pull request #734 from rust-lang/improve-index-item #53

Workflow file for this run

name: Deploy
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v2
with:
submodules: true
- name: Install Hugo
run: sudo apt install hugo
- name: Minify HTML
run: hugo --minify
- name: Deploy
run: |
deploy_dir=public
# Ensure GitHub doesn't mess around with the uploaded file.
# Without the file, for example, files with an underscore in the name won't be
# included in the pages.
touch "${deploy_dir}/.nojekyll"
# Push the website to GitHub pages
cd "${deploy_dir}"
rm -rf .git
git init
git config user.name "Deploy from CI"
git config user.email ""
git add .
git commit -m "Deploy ${GITHUB_SHA} to gh-pages"
git push -f "https://x-token:${github_token}@github.com/${GITHUB_REPOSITORY}" master:gh-pages
env:
github_token: ${{ secrets.GITHUB_TOKEN }}