Skip to content

Commit

Permalink
Merge pull request #1 from mikiken/Add-workflow-of-deployment-to-miki…
Browse files Browse the repository at this point in the history
…ken.net

Create deployment.yml
  • Loading branch information
mikiken authored Nov 9, 2023
2 parents d7d0378 + 21787a8 commit 679a731
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main # Set a branch name to trigger deployment
paths:
- "index.html"
pull_request:

jobs:
deploy:
runs-on: ubuntu-20.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout source repository
- uses: actions/checkout@v3

- name: Checkout deployment repository
uses: actions/checkout@v3
with:
repository: mikiken/mikiken.net
path: compiler_log/
token: ${{ secrets.ACTIONS_DEPLOY_KEY }}

- name: Copy file
run: |
cp index.html mikiken.net/compiler_log/index.html
- name: Push changes
run: |
cd mikiken.net
git config user.name mikiken
git config user.email [email protected]
git add compiler_log/index.html
git commit -m "Update `compiler_log/index.html via github-actions` "
git push origin main

0 comments on commit 679a731

Please sign in to comment.