mirror of
https://github.com/matrix-org/matrix.org.git
synced 2026-01-11 20:07:22 +00:00
New site preview CI job
This commit is contained in:
parent
1c3fbfc6eb
commit
7b804d0947
3 changed files with 37 additions and 21 deletions
|
|
@ -10,3 +10,7 @@ trim_trailing_whitespace = true
|
|||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
# GitHub workflows
|
||||
[*.yml]
|
||||
indent_size = 2
|
||||
|
|
|
|||
33
.github/workflows/zola.yml
vendored
Normal file
33
.github/workflows/zola.yml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
name: Build site
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- zola
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Build and deploy the site
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Repository checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Download Zola
|
||||
run: |
|
||||
version='v0.16.1'
|
||||
archive="zola-${version}-x86_64-unknown-linux-gnu.tar.gz"
|
||||
curl -L "https://github.com/getzola/zola/releases/download/${version}/${archive}" -o "$archive"
|
||||
tar xf "$archive"
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
./zola build
|
||||
|
||||
- name: Deploy
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
uses: JamesIves/github-pages-deploy-action@4.1.4
|
||||
with:
|
||||
folder: public
|
||||
repository-name: matrix-org/zola-preview
|
||||
branch: main
|
||||
ssh-key: ${{ secrets.ZOLA_DEPLOY_KEY }}
|
||||
21
.github/workflows/zola_temp.yml
vendored
21
.github/workflows/zola_temp.yml
vendored
|
|
@ -1,21 +0,0 @@
|
|||
# This is just added to share it while I'm working on it
|
||||
on: push
|
||||
name: Build and deploy GH Pages
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/MTRNord/zola'
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Set twitter secret
|
||||
run: sed -i "s/%twitter_secret%/$TWITTER_TOKEN/" zola/config.toml
|
||||
env:
|
||||
TWITTER_TOKEN: ${{ secrets.TWITTER_TOKEN }}
|
||||
- name: build_and_deploy
|
||||
uses: shalzz/zola-deploy-action@v0.16.1
|
||||
env:
|
||||
PAGES_BRANCH: gh-pages
|
||||
BUILD_DIR: zola
|
||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CHECK_LINKS: true
|
||||
Loading…
Add table
Reference in a new issue