mirror of
https://github.com/changkun/modern-cpp-tutorial.git
synced 2025-12-16 20:27:08 +03:00
github: switch to action from travis (#153)
This commit is contained in:
29
.github/workflows/website.yml
vendored
Normal file
29
.github/workflows/website.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Website
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Website
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: build
|
||||
env:
|
||||
USER: ${{ secrets.SERVER_USER }}
|
||||
TARGET: ${{ secrets.SERVER_PATH }}
|
||||
KEY: ${{ secrets.SERVER_KEY }}
|
||||
DOMAIN: ${{ secrets.SERVER_DOMAIN }}
|
||||
run: |
|
||||
make build
|
||||
mkdir ~/.ssh
|
||||
echo "$KEY" | tr -d '\r' > ~/.ssh/id_ed25519
|
||||
chmod 400 ~/.ssh/id_ed25519
|
||||
eval "$(ssh-agent -s)"
|
||||
ssh-add ~/.ssh/id_ed25519
|
||||
ssh-keyscan -H $DOMAIN >> ~/.ssh/known_hosts
|
||||
scp -r website/public/modern-cpp/* $USER@$DOMAIN:$TARGET
|
||||
Reference in New Issue
Block a user