Добавлен сигнальный сервер, сделана передача текста #5
Workflow file for this run
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: Deploy static content to Pages | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| check-tags: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| tag: ${{ steps.version.outputs.tag }} | |
| release: ${{ steps.version.outputs.release }} | |
| steps: | |
| - name: Скачивание репозитория | |
| uses: actions/checkout@v4 | |
| - name: Определение версии | |
| id: version | |
| run: | | |
| tag=false | |
| release=false | |
| # Определяем, что было выбрано: branch или tag | |
| if [[ "$GITHUB_REF" == refs/tags/* ]]; then | |
| TAG_NAME="${GITHUB_REF#refs/tags/}" | |
| echo "tag=$TAG_NAME" >> $GITHUB_OUTPUT | |
| SEGMENTS=$(echo "$TAG_NAME" | tr '.' '\n' | wc -l) | |
| if [ "$SEGMENTS" -le 3 ]; then | |
| echo "release=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "release=false" >> $GITHUB_OUTPUT | |
| fi | |
| else | |
| echo "tag=false" >> $GITHUB_OUTPUT | |
| echo "release=false" >> $GITHUB_OUTPUT | |
| fi | |
| deploy: | |
| needs: check-tags | |
| if: needs.check-tags.outputs.tag != 'false' | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: 'web' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |