You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.6 KiB
39 lines
1.6 KiB
---
|
|
branches: main # Ideally, only run on pushes to main branch and PRs
|
|
pipeline:
|
|
staging:
|
|
image: alpine:3
|
|
when:
|
|
event: [ pull_request ]
|
|
secrets: [ ssh_key ]
|
|
commands:
|
|
- apk add --no-cache git hugo just openssh-client python3 rsync
|
|
# lychee hasn't been packaged for Alpine Linux
|
|
- apk add --no-cache curl
|
|
- curl -LO https://github.com/lycheeverse/lychee/releases/download/v0.9.0/lychee-v0.9.0-x86_64-unknown-linux-musl.tar.gz
|
|
- tar -xzf lychee-v0.9.0-x86_64-unknown-linux-musl.tar.gz -C /usr/bin
|
|
- mkdir -p ~/.ssh && echo "StrictHostKeyChecking=no" >> ~/.ssh/config
|
|
- eval "$(ssh-agent -s)"
|
|
- echo "$SSH_KEY" | ssh-add -
|
|
- ./generatestageinfo.sh
|
|
- hugo version
|
|
- just deploy-staging
|
|
|
|
main:
|
|
image: alpine:3
|
|
when:
|
|
event: push
|
|
branch: main
|
|
secrets: [ ssh_key ]
|
|
commands:
|
|
- apk add --no-cache git hugo just openssh-client python3 rsync
|
|
# lychee hasn't been packaged for Alpine Linux
|
|
- apk add --no-cache curl
|
|
- curl -LO https://github.com/lycheeverse/lychee/releases/download/v0.9.0/lychee-v0.9.0-x86_64-unknown-linux-musl.tar.gz
|
|
- tar -xzf lychee-v0.9.0-x86_64-unknown-linux-musl.tar.gz -C /usr/bin
|
|
- mkdir -p ~/.ssh && echo "StrictHostKeyChecking=no" >> ~/.ssh/config
|
|
- eval "$(ssh-agent -s)"
|
|
- echo "$SSH_KEY" | ssh-add -
|
|
- hugo version
|
|
- just deploy-main
|