From 8e27dc20728b049a90c808c8edb2b9a11ffdeed6 Mon Sep 17 00:00:00 2001 From: HAHWUL Date: Fri, 19 Aug 2022 17:32:56 +0900 Subject: [PATCH] Create deploy.yml --- .github/workflows/deploy.yml | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..ddcb6d5 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,42 @@ +name: Deploy + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + ERB: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.0 + - name: Install dependencies + run: gem install erb yaml + - name: Run app + run: | + ruby ./scripts/erb.rb + Deploy: + runs-on: ubuntu-latest + needs: [ERB] + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 2 + - name: Make last_change + run: date > ./script/last_change + - name: Commit files + run: | + git config --local user.email "hahwul@gmail.com" + git config --local user.name "WHW" + git add README.md ./script/last_change + git commit -m "Deploy README.md" + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }}