Skip to content

Commit

Permalink
Add github actions to publish gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
afq984 committed Dec 4, 2024
1 parent 37a0f71 commit 1771431
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Actions

on:
push:
branches: [main]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: mkdir -p out
- run: cp -r data/webrtc/* out
- uses: actions/upload-artifact@v4
with:
name: out
path: out/

deploy:
if: ${{ github.ref == 'refs/heads/main' }}
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: out
path: out/

- run: |
cd out/
git init -b gh-pages
git config user.name chromeos-rtc+bot
git config user.email [email protected]
git add -A
git commit -m 'build ${{ github.sha }}'
git remote add pages https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}
git push pages gh-pages --force

0 comments on commit 1771431

Please sign in to comment.