diff --git a/.github/workflows/tyls_vnh_workflows b/.github/workflows/tyls_vnh_workflows index c7b2106..441e1a5 100644 --- a/.github/workflows/tyls_vnh_workflows +++ b/.github/workflows/tyls_vnh_workflows @@ -10,31 +10,40 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v2 + - name: Checkout repository + uses: actions/checkout@v2 - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: '18.15.0' + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '18.15.0' - - name: Install dependencies - run: npm install + - name: Install dependencies + run: npm install - - name: Build Angular app - run: npm run build + - name: Build Angular app + run: npm run build deploy: runs-on: ubuntu-latest needs: build steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Deploy to GitHub Pages - uses: JamesIves/github-pages-deploy-action@3.7.1 - with: - branch: gh-pages - folder: dist # Thay đổi folder nếu bạn đặt thư mục build ở nơi khác - clean: true - token: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@3.7.1 + with: + branch: gh-pages + folder: docs + clean: true + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Copy built files to root + run: cp -r docs/* . + + - name: Commit changes + run: | + git add . + git commit -m "Update GitHub Pages deployment" + git push origin gh-pages