diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..e41b5a3 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,37 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - main + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install dependencies + run: npm ci + + - name: Build project + run: npm run build + + - name: Copy CNAME (if exists) + run: | + if [ -f public/CNAME ]; then + cp public/CNAME public/build/CNAME + fi + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public/build + publish_branch: gh-pages diff --git a/public/CNAME b/public/CNAME new file mode 100644 index 0000000..f31243e --- /dev/null +++ b/public/CNAME @@ -0,0 +1 @@ +logos.shadoll.com