diff --git a/.github/workflows/spec.yml b/.github/workflows/spec.yml new file mode 100644 index 000000000000..0d4f91e66002 --- /dev/null +++ b/.github/workflows/spec.yml @@ -0,0 +1,55 @@ +name: Specification + +on: + push: + tags: + - '*' + branches-ignore: + - 'gh-readonly-queue/**' + pull_request: + merge_group: + workflow_dispatch: + +env: + DOTTY_CI_RUN: true + +jobs: + specification: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./docs/_spec + + steps: + - uses: actions/checkout@v3 + + # Keep in sync with ./docs/_spec/Dockerfile + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '2.7' + - name: Install required gems + run: | + gem update --system + gem install sass-embedded -v 1.58.0 + gem install bundler:1.17.2 jekyll + bundle install + npm install bower + + - name: Build the specification + run: | + bundle exec jekyll build + + # Deploy + - name: Deployment + env: + USER_FOR_TEST: ${{ secrets.SPEC_DEPLOY_USER }} + if: ${{ env.USER_FOR_TEST != '' }} + uses: burnett01/rsync-deployments@6.0.0 + with: + switches: -rzv + path: docs/_spec/_site/ + remote_path: ${{ secrets.SPEC_DEPLOY_PATH }} + remote_host: ${{ secrets.SPEC_DEPLOY_HOST }} + remote_user: ${{ secrets.SPEC_DEPLOY_USER }} + remote_key: ${{ secrets.SPEC_DEPLOY_KEY }} + remote_key_pass: ${{ secrets.SPEC_DEPLOY_PASS }} diff --git a/docs/_spec/Dockerfile b/docs/_spec/Dockerfile index 1fc28081c59f..6f0c349da396 100644 --- a/docs/_spec/Dockerfile +++ b/docs/_spec/Dockerfile @@ -1,3 +1,5 @@ +# Keep in sync with relevant parts of .github/workflows/spec.yml + FROM ruby:2.7 RUN apt-get install -y curl \ diff --git a/docs/_spec/README.md b/docs/_spec/README.md index b9eba413f8a2..f8a59e86896c 100644 --- a/docs/_spec/README.md +++ b/docs/_spec/README.md @@ -1,6 +1,6 @@ # WIP Scala 3 Language Specification -**This is still a work in progress, and should *not* be regarded as a source of truth.** +**This is still a work in progress. There are still Scala 3 features missing, as well as some areas that have not been updated since 2.13 yet.** First of all, the language specification is meant to be correct, precise and clear. @@ -25,8 +25,8 @@ To preview locally, run the following commands in the docs/_spec subfolder: env UID="$(id -u)" GID="$(id -g)" docker-compose up ``` -and open http://0.0.0.0:4000/files/archive/spec/2.13/ to view the spec. Jekyll will rebuild as you edit the markdown, but make sure to restart it when you change `_config.yml`. -