Skip to content

Update deploy.yml

Update deploy.yml #7

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- github
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- name: Build with Maven
run: mvn clean install
- name: Deploy to GitHub Pages
run: |
mkdir -p out
cp -r target/* out/
cd out
git init
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Deploy to GitHub Pages"
git branch -M github
git push --force "https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" github