Deployment #1588
This file contains 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
name: Deployment | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 4 * * *' | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
deployment: | |
name: deployment | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Date | |
id: get-date | |
run: | | |
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT | |
- name: Cache ccache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.ccache | |
key: ${{ runner.os }}-ccache-${{ steps.get-date.outputs.date }} | |
restore-keys: | | |
${{ runner.os }}-ccache- | |
- name: Cache pip | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ steps.get-date.outputs.date }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install | |
run: | | |
GITHUB_REF=${GITHUB_REF#refs/heads/} | |
GITHUB_REF=${GITHUB_REF#refs/tags/} | |
BRANCH=${GITHUB_BASE_REF:-${GITHUB_REF}} | |
mkdir -p ${HOME}/.ssh | |
ssh-keyscan -t rsa -H "github.com" 2>&1 | tee -a "${HOME}"/.ssh/known_hosts | |
.ci/install.bash --branch=${BRANCH} --sl=ed --sl=geolib2 --sl=rgbd # (In)direct deps of ed_object_models, but we don't need to build it | |
- name: Script | |
run: .ci/script.bash | |
- name: Before Deploy | |
if: ${{ (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master' }} | |
run: .ci/pre_deploy.bash | |
- name: Deploy | |
if: ${{ (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master' }} | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: . | |
destination_dir: . | |
exclude_assets: '.github,.ci' | |
enable_jekyll: true | |
force_orphan: true |