Update readme #5
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: Publish to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install Dependencies | |
| run: npm install | |
| - name: Build | |
| run: BUILD_TARGET=demo npm run build -- --base=/aidbox-forms-renderer | |
| - name: Add GitHub ribbon to built files | |
| run: | | |
| # Add GitHub fork ribbon CSS to the head | |
| sed -i 's|</head>| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.3/gh-fork-ribbon.min.css" />\n </head>|' dist/index.html | |
| # Add GitHub fork ribbon HTML to the body | |
| sed -i 's|<body>|<body>\n <a class="github-fork-ribbon" href="https://github.com/HealthSamurai/aidbox-forms-renderer" data-ribbon="Fork me on GitHub" title="Fork me on GitHub">Fork me on GitHub</a>|' dist/index.html | |
| - name: Publish | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| folder: dist |