PID 控制笔记 #112
  
    
      This file contains hidden or 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: Docker Image CI | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| # - name: Build the Docker image | |
| # run: docker build . --file Dockerfile --tag sjk | |
| # - name: Setup upterm session | |
| # uses: lhotari/action-upterm@v1 | |
| - name: Build static site | |
| run: docker run -v `pwd`:/blog sidgwick/jekyll:latest | |
| - name: Deploy to GitHub Pages | |
| uses: crazy-max/ghaction-github-pages@v2 | |
| with: | |
| target_branch: gh-pages | |
| build_dir: _site | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Deploy to Staging server | |
| uses: easingthemes/ssh-deploy@main | |
| env: | |
| SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | |
| ARGS: "-rltgoDzvO" | |
| SOURCE: "_site" | |
| REMOTE_HOST: ${{ secrets.HOST }} | |
| REMOTE_PORT: ${{ secrets.PORT }} | |
| REMOTE_USER: ${{ secrets.USER }} | |
| TARGET: ${{ secrets.TARGET }} |