diff options
Diffstat (limited to '.github/workflows/jekyll.yml')
-rw-r--r-- | .github/workflows/jekyll.yml | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml new file mode 100644 index 0000000..d78a00c --- /dev/null +++ b/.github/workflows/jekyll.yml @@ -0,0 +1,48 @@ +name: Jekyll + +on: + workflow_call: + workflow_dispatch: + +jobs: + maintenance: + strategy: + matrix: + project: + - jekyll-theme + runs-on: ubuntu-latest + name: '${{ matrix.project }}' + env: + GH_TOKEN: '${{ github.token }}' + steps: + - name: Configure SSH + run: | + mkdir -p ~/.ssh + cat > ~/.ssh/config <<'EOF' + StrictHostKeyChecking no + EOF + - name: Set up ssh-agent + uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: '${{ secrets.SSH_KEY }}' + - name: Checkout + run: | + git clone -q 'ssh://git@github.com/egor-tensin/${{ matrix.project }}.git' + - name: find + run: find + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + working-directory: '${{ matrix.project }}' + - name: Configure git + run: | + git config --global user.name 'Egor Tensin' + git config --global user.email 'egor@tensin.name' + - name: Run maintenance + run: | + make -C '${{ matrix.project }}' maintenance + - name: Wait until the run is finished + run: | + id="$( gh run list --json databaseId --limit 1 --status completed --jq '.[0].databaseId' )" + gh run watch --repo 'egor-tensin/${{ matrix.project }}' --compact --exit-status "$id" |