Publish Website #14983
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: Publish Website | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '22 7 * * *' | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-22.04 | |
env: | |
WX_SITE_DIR: ${{ github.workspace }} | |
steps: | |
- name: Checkout Website | |
uses: actions/checkout@v3 | |
- name: Checkout wxWidgets | |
uses: actions/checkout@v3 | |
with: | |
repository: wxWidgets/wxWidgets | |
path: wxWidgets | |
- name: Yarn Install | |
run: yarn | |
- name: Compile Assets | |
run: yarn dist | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.0' | |
bundler-cache: true | |
- name: Update Release Info | |
run: ruby update_release_info.rb | |
- name: Update Download Stats | |
run: ruby _cron/update_download_stats.rb | |
- name: Update Translation Stats | |
run: | | |
sudo apt-get install -qq gettext | |
./_cron/update_translation_stats.sh | |
- name: Update wxXRC Schema | |
run: _cron/update_wxxrc_schema.sh | |
- name: Build | |
run: bundle exec jekyll build | |
- name: Upload | |
if: github.repository_owner == 'wxWidgets' && github.ref == 'refs/heads/master' | |
env: | |
REMOTE_KEY: ${{secrets.REMOTE_KEY}} | |
REMOTE_PATH: ${{secrets.REMOTE_PATH}} | |
run: | | |
mkdir "$HOME/.ssh" | |
echo "$REMOTE_KEY" > "$HOME/.ssh/remote_key" | |
chmod 600 "$HOME/.ssh/remote_key" | |
rsync -crz --delete -e "ssh -i $HOME/.ssh/remote_key -o LogLevel=error -o StrictHostKeyChecking=no" _site/ "$REMOTE_PATH" |