Update Guides from facebook/hhvm #26255
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update Guides from facebook/hhvm | |
| on: | |
| push: | |
| branches: | |
| # Run when changes are pushed to main too. This makes it easier | |
| # to make changes to this file and see the results. | |
| - main | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| schedule: | |
| # Fifteen minutes past the hour, every hour. | |
| # (GitHub Actions are heavily used at o'clock, so arbitrarily | |
| # choose another time.) | |
| - cron: '15 * * * *' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout user-documentation | |
| uses: actions/checkout@v3 | |
| - name: Download the latest facebook/hhvm | |
| run: wget https://github.com/facebook/hhvm/archive/refs/heads/master.zip | |
| - name: Unzip | |
| run: unzip -q master.zip | |
| - name: Check directory contents | |
| run: ls | |
| - name: Remove old copy of Hack guides | |
| run: | | |
| rm -rf manual/* | |
| - name: Use the latest copy of the manual from facebook/hhvm instead | |
| run: | | |
| rm hhvm-master/hphp/hack/website/README.md | |
| cp -r hhvm-master/hphp/hack/manual/* manual | |
| cp -r hhvm-master/hphp/hack/website/* . | |
| sed -i "s#'\.\./manual/'#'./manual/'#g" docusaurus.config.js | |
| - name: Clean up | |
| run: rm -r hhvm-master master.zip | |
| - name: Create a commit | |
| uses: stefanzweifel/git-auto-commit-action@v4 | |
| with: | |
| commit_message: Update guides from HHVM repository |